3.2.57 \(\int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) [157]

Optimal. Leaf size=224 \[ \frac {7 x}{64 a^4}+\frac {i a^2}{48 d (a+i a \tan (c+d x))^6}+\frac {3 i a}{80 d (a+i a \tan (c+d x))^5}+\frac {3 i}{64 d (a+i a \tan (c+d x))^4}+\frac {5 i}{96 a d (a+i a \tan (c+d x))^3}-\frac {i}{256 d \left (a^2-i a^2 \tan (c+d x)\right )^2}+\frac {15 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac {7 i}{256 d \left (a^4-i a^4 \tan (c+d x)\right )}+\frac {21 i}{256 d \left (a^4+i a^4 \tan (c+d x)\right )} \]

[Out]

7/64*x/a^4+1/48*I*a^2/d/(a+I*a*tan(d*x+c))^6+3/80*I*a/d/(a+I*a*tan(d*x+c))^5+3/64*I/d/(a+I*a*tan(d*x+c))^4+5/9
6*I/a/d/(a+I*a*tan(d*x+c))^3-1/256*I/d/(a^2-I*a^2*tan(d*x+c))^2+15/256*I/d/(a^2+I*a^2*tan(d*x+c))^2-7/256*I/d/
(a^4-I*a^4*tan(d*x+c))+21/256*I/d/(a^4+I*a^4*tan(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 224, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3568, 46, 212} \begin {gather*} -\frac {7 i}{256 d \left (a^4-i a^4 \tan (c+d x)\right )}+\frac {21 i}{256 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {7 x}{64 a^4}+\frac {i a^2}{48 d (a+i a \tan (c+d x))^6}-\frac {i}{256 d \left (a^2-i a^2 \tan (c+d x)\right )^2}+\frac {15 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac {3 i a}{80 d (a+i a \tan (c+d x))^5}+\frac {3 i}{64 d (a+i a \tan (c+d x))^4}+\frac {5 i}{96 a d (a+i a \tan (c+d x))^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(7*x)/(64*a^4) + ((I/48)*a^2)/(d*(a + I*a*Tan[c + d*x])^6) + (((3*I)/80)*a)/(d*(a + I*a*Tan[c + d*x])^5) + ((3
*I)/64)/(d*(a + I*a*Tan[c + d*x])^4) + ((5*I)/96)/(a*d*(a + I*a*Tan[c + d*x])^3) - (I/256)/(d*(a^2 - I*a^2*Tan
[c + d*x])^2) + ((15*I)/256)/(d*(a^2 + I*a^2*Tan[c + d*x])^2) - ((7*I)/256)/(d*(a^4 - I*a^4*Tan[c + d*x])) + (
(21*I)/256)/(d*(a^4 + I*a^4*Tan[c + d*x]))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=-\frac {\left (i a^5\right ) \text {Subst}\left (\int \frac {1}{(a-x)^3 (a+x)^7} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^5\right ) \text {Subst}\left (\int \left (\frac {1}{128 a^7 (a-x)^3}+\frac {7}{256 a^8 (a-x)^2}+\frac {1}{8 a^3 (a+x)^7}+\frac {3}{16 a^4 (a+x)^6}+\frac {3}{16 a^5 (a+x)^5}+\frac {5}{32 a^6 (a+x)^4}+\frac {15}{128 a^7 (a+x)^3}+\frac {21}{256 a^8 (a+x)^2}+\frac {7}{64 a^8 \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {i a^2}{48 d (a+i a \tan (c+d x))^6}+\frac {3 i a}{80 d (a+i a \tan (c+d x))^5}+\frac {3 i}{64 d (a+i a \tan (c+d x))^4}+\frac {5 i}{96 a d (a+i a \tan (c+d x))^3}-\frac {i}{256 d \left (a^2-i a^2 \tan (c+d x)\right )^2}+\frac {15 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac {7 i}{256 d \left (a^4-i a^4 \tan (c+d x)\right )}+\frac {21 i}{256 d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {(7 i) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{64 a^3 d}\\ &=\frac {7 x}{64 a^4}+\frac {i a^2}{48 d (a+i a \tan (c+d x))^6}+\frac {3 i a}{80 d (a+i a \tan (c+d x))^5}+\frac {3 i}{64 d (a+i a \tan (c+d x))^4}+\frac {5 i}{96 a d (a+i a \tan (c+d x))^3}-\frac {i}{256 d \left (a^2-i a^2 \tan (c+d x)\right )^2}+\frac {15 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac {7 i}{256 d \left (a^4-i a^4 \tan (c+d x)\right )}+\frac {21 i}{256 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.80, size = 142, normalized size = 0.63 \begin {gather*} \frac {\sec ^4(c+d x) (525 i+1120 i \cos (2 (c+d x))+105 (i+8 d x) \cos (4 (c+d x))-96 i \cos (6 (c+d x))-5 i \cos (8 (c+d x))-560 \sin (2 (c+d x))+105 \sin (4 (c+d x))+840 i d x \sin (4 (c+d x))+144 \sin (6 (c+d x))+10 \sin (8 (c+d x)))}{7680 a^4 d (-i+\tan (c+d x))^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(Sec[c + d*x]^4*(525*I + (1120*I)*Cos[2*(c + d*x)] + 105*(I + 8*d*x)*Cos[4*(c + d*x)] - (96*I)*Cos[6*(c + d*x)
] - (5*I)*Cos[8*(c + d*x)] - 560*Sin[2*(c + d*x)] + 105*Sin[4*(c + d*x)] + (840*I)*d*x*Sin[4*(c + d*x)] + 144*
Sin[6*(c + d*x)] + 10*Sin[8*(c + d*x)]))/(7680*a^4*d*(-I + Tan[c + d*x])^4)

________________________________________________________________________________________

Maple [A]
time = 0.30, size = 143, normalized size = 0.64

method result size
derivativedivides \(\frac {-\frac {7 i \ln \left (\tan \left (d x +c \right )-i\right )}{128}+\frac {3 i}{64 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {i}{48 \left (\tan \left (d x +c \right )-i\right )^{6}}-\frac {15 i}{256 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {3}{80 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {5}{96 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {21}{256 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{256 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {7 i \ln \left (\tan \left (d x +c \right )+i\right )}{128}+\frac {7}{256 \left (\tan \left (d x +c \right )+i\right )}}{d \,a^{4}}\) \(143\)
default \(\frac {-\frac {7 i \ln \left (\tan \left (d x +c \right )-i\right )}{128}+\frac {3 i}{64 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {i}{48 \left (\tan \left (d x +c \right )-i\right )^{6}}-\frac {15 i}{256 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {3}{80 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {5}{96 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {21}{256 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{256 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {7 i \ln \left (\tan \left (d x +c \right )+i\right )}{128}+\frac {7}{256 \left (\tan \left (d x +c \right )+i\right )}}{d \,a^{4}}\) \(143\)
risch \(\frac {7 x}{64 a^{4}}+\frac {7 i {\mathrm e}^{-6 i \left (d x +c \right )}}{192 a^{4} d}+\frac {7 i {\mathrm e}^{-8 i \left (d x +c \right )}}{512 a^{4} d}+\frac {i {\mathrm e}^{-10 i \left (d x +c \right )}}{320 a^{4} d}+\frac {i {\mathrm e}^{-12 i \left (d x +c \right )}}{3072 a^{4} d}+\frac {69 i \cos \left (4 d x +4 c \right )}{1024 a^{4} d}+\frac {71 \sin \left (4 d x +4 c \right )}{1024 a^{4} d}+\frac {3 i \cos \left (2 d x +2 c \right )}{32 a^{4} d}+\frac {\sin \left (2 d x +2 c \right )}{8 a^{4} d}\) \(150\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)

[Out]

1/d/a^4*(-7/128*I*ln(tan(d*x+c)-I)+3/64*I/(tan(d*x+c)-I)^4-1/48*I/(tan(d*x+c)-I)^6-15/256*I/(tan(d*x+c)-I)^2+3
/80/(tan(d*x+c)-I)^5-5/96/(tan(d*x+c)-I)^3+21/256/(tan(d*x+c)-I)+1/256*I/(tan(d*x+c)+I)^2+7/128*I*ln(tan(d*x+c
)+I)+7/256/(tan(d*x+c)+I))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 109, normalized size = 0.49 \begin {gather*} \frac {{\left (1680 \, d x e^{\left (12 i \, d x + 12 i \, c\right )} - 15 i \, e^{\left (16 i \, d x + 16 i \, c\right )} - 240 i \, e^{\left (14 i \, d x + 14 i \, c\right )} + 1680 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 1050 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 560 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 210 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 48 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-12 i \, d x - 12 i \, c\right )}}{15360 \, a^{4} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/15360*(1680*d*x*e^(12*I*d*x + 12*I*c) - 15*I*e^(16*I*d*x + 16*I*c) - 240*I*e^(14*I*d*x + 14*I*c) + 1680*I*e^
(10*I*d*x + 10*I*c) + 1050*I*e^(8*I*d*x + 8*I*c) + 560*I*e^(6*I*d*x + 6*I*c) + 210*I*e^(4*I*d*x + 4*I*c) + 48*
I*e^(2*I*d*x + 2*I*c) + 5*I)*e^(-12*I*d*x - 12*I*c)/(a^4*d)

________________________________________________________________________________________

Sympy [A]
time = 0.42, size = 326, normalized size = 1.46 \begin {gather*} \begin {cases} \frac {\left (- 202661983231672320 i a^{28} d^{7} e^{46 i c} e^{4 i d x} - 3242591731706757120 i a^{28} d^{7} e^{44 i c} e^{2 i d x} + 22698142121947299840 i a^{28} d^{7} e^{40 i c} e^{- 2 i d x} + 14186338826217062400 i a^{28} d^{7} e^{38 i c} e^{- 4 i d x} + 7566047373982433280 i a^{28} d^{7} e^{36 i c} e^{- 6 i d x} + 2837267765243412480 i a^{28} d^{7} e^{34 i c} e^{- 8 i d x} + 648518346341351424 i a^{28} d^{7} e^{32 i c} e^{- 10 i d x} + 67553994410557440 i a^{28} d^{7} e^{30 i c} e^{- 12 i d x}\right ) e^{- 42 i c}}{207525870829232455680 a^{32} d^{8}} & \text {for}\: a^{32} d^{8} e^{42 i c} \neq 0 \\x \left (\frac {\left (e^{16 i c} + 8 e^{14 i c} + 28 e^{12 i c} + 56 e^{10 i c} + 70 e^{8 i c} + 56 e^{6 i c} + 28 e^{4 i c} + 8 e^{2 i c} + 1\right ) e^{- 12 i c}}{256 a^{4}} - \frac {7}{64 a^{4}}\right ) & \text {otherwise} \end {cases} + \frac {7 x}{64 a^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4/(a+I*a*tan(d*x+c))**4,x)

[Out]

Piecewise(((-202661983231672320*I*a**28*d**7*exp(46*I*c)*exp(4*I*d*x) - 3242591731706757120*I*a**28*d**7*exp(4
4*I*c)*exp(2*I*d*x) + 22698142121947299840*I*a**28*d**7*exp(40*I*c)*exp(-2*I*d*x) + 14186338826217062400*I*a**
28*d**7*exp(38*I*c)*exp(-4*I*d*x) + 7566047373982433280*I*a**28*d**7*exp(36*I*c)*exp(-6*I*d*x) + 2837267765243
412480*I*a**28*d**7*exp(34*I*c)*exp(-8*I*d*x) + 648518346341351424*I*a**28*d**7*exp(32*I*c)*exp(-10*I*d*x) + 6
7553994410557440*I*a**28*d**7*exp(30*I*c)*exp(-12*I*d*x))*exp(-42*I*c)/(207525870829232455680*a**32*d**8), Ne(
a**32*d**8*exp(42*I*c), 0)), (x*((exp(16*I*c) + 8*exp(14*I*c) + 28*exp(12*I*c) + 56*exp(10*I*c) + 70*exp(8*I*c
) + 56*exp(6*I*c) + 28*exp(4*I*c) + 8*exp(2*I*c) + 1)*exp(-12*I*c)/(256*a**4) - 7/(64*a**4)), True)) + 7*x/(64
*a**4)

________________________________________________________________________________________

Giac [A]
time = 0.85, size = 147, normalized size = 0.66 \begin {gather*} -\frac {-\frac {420 i \, \log \left (-i \, \tan \left (d x + c\right ) + 1\right )}{a^{4}} + \frac {420 i \, \log \left (-i \, \tan \left (d x + c\right ) - 1\right )}{a^{4}} + \frac {30 \, {\left (21 i \, \tan \left (d x + c\right )^{2} - 49 \, \tan \left (d x + c\right ) - 29 i\right )}}{a^{4} {\left (\tan \left (d x + c\right ) + i\right )}^{2}} + \frac {-1029 i \, \tan \left (d x + c\right )^{6} - 6804 \, \tan \left (d x + c\right )^{5} + 19035 i \, \tan \left (d x + c\right )^{4} + 29080 \, \tan \left (d x + c\right )^{3} - 25995 i \, \tan \left (d x + c\right )^{2} - 13332 \, \tan \left (d x + c\right ) + 3317 i}{a^{4} {\left (\tan \left (d x + c\right ) - i\right )}^{6}}}{7680 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

-1/7680*(-420*I*log(-I*tan(d*x + c) + 1)/a^4 + 420*I*log(-I*tan(d*x + c) - 1)/a^4 + 30*(21*I*tan(d*x + c)^2 -
49*tan(d*x + c) - 29*I)/(a^4*(tan(d*x + c) + I)^2) + (-1029*I*tan(d*x + c)^6 - 6804*tan(d*x + c)^5 + 19035*I*t
an(d*x + c)^4 + 29080*tan(d*x + c)^3 - 25995*I*tan(d*x + c)^2 - 13332*tan(d*x + c) + 3317*I)/(a^4*(tan(d*x + c
) - I)^6))/d

________________________________________________________________________________________

Mupad [B]
time = 4.94, size = 197, normalized size = 0.88 \begin {gather*} \frac {7\,x}{64\,a^4}+\frac {\frac {\mathrm {tan}\left (c+d\,x\right )\,169{}\mathrm {i}}{960\,a^4}+\frac {4}{15\,a^4}+\frac {119\,{\mathrm {tan}\left (c+d\,x\right )}^2}{240\,a^4}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,889{}\mathrm {i}}{960\,a^4}-\frac {7\,{\mathrm {tan}\left (c+d\,x\right )}^4}{24\,a^4}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^5\,91{}\mathrm {i}}{192\,a^4}-\frac {7\,{\mathrm {tan}\left (c+d\,x\right )}^6}{16\,a^4}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^7\,7{}\mathrm {i}}{64\,a^4}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^8\,1{}\mathrm {i}-4\,{\mathrm {tan}\left (c+d\,x\right )}^7+{\mathrm {tan}\left (c+d\,x\right )}^6\,4{}\mathrm {i}-4\,{\mathrm {tan}\left (c+d\,x\right )}^5+{\mathrm {tan}\left (c+d\,x\right )}^4\,10{}\mathrm {i}+4\,{\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,4{}\mathrm {i}+4\,\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^4/(a + a*tan(c + d*x)*1i)^4,x)

[Out]

(7*x)/(64*a^4) + ((tan(c + d*x)*169i)/(960*a^4) + 4/(15*a^4) + (119*tan(c + d*x)^2)/(240*a^4) + (tan(c + d*x)^
3*889i)/(960*a^4) - (7*tan(c + d*x)^4)/(24*a^4) + (tan(c + d*x)^5*91i)/(192*a^4) - (7*tan(c + d*x)^6)/(16*a^4)
 - (tan(c + d*x)^7*7i)/(64*a^4))/(d*(4*tan(c + d*x) + tan(c + d*x)^2*4i + 4*tan(c + d*x)^3 + tan(c + d*x)^4*10
i - 4*tan(c + d*x)^5 + tan(c + d*x)^6*4i - 4*tan(c + d*x)^7 - tan(c + d*x)^8*1i - 1i))

________________________________________________________________________________________